Starting at 1994-01-31. Ending at 2022-12-31. Number of periods 348. Periodicity is monthly.
summary_table
library(dygraphs)
p <- list()
p[[1]] = dygraphs::dygraph(portfolio_data_xts(portfolios,data.name = 'cum_return'),
main = "Cumulative Return", group = "A") %>%
dyRebase(value = params$global.settings$starting.capital) %>%
dyRangeSelector() %>% dyOptions(colors = RColorBrewer::brewer.pal(6, "Set2")) %>%
dyHighlight(highlightSeriesOpts = list(strokeWidth = 3)) %>% dyAxis("y",logscale = TRUE)
htmltools::tagList(p)
library(dygraphs)
p <- list()
p[[1]] = dygraphs::dygraph(portfolio_data_xts(portfolios,data.name = 'cum_return'),
main = "Cumulative Return", group = "A") %>%
dyRebase(percent = TRUE) %>%
dyRangeSelector() %>% dyOptions(colors = RColorBrewer::brewer.pal(6, "Set2")) %>%
dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))
htmltools::tagList(p)
library(ggplot2)
for(study in params$chart.settings$chart_studies){
study_plot <- ggplot(portfolio_data(portfolios,data.name = study) ,
aes(x=date, y = value, color = name)) + geom_line() +
theme_bw() + ggtitle(study) + geom_hline(yintercept = 0)
if(params$chart.settings$facets){
study_plot <- study_plot + facet_wrap(~name, scales = params$chart.settings$facets_scales)
}
if(params$chart.settings$facets){
study_plot <- study_plot + theme(legend.position = 'none')
}
print(study_plot)
}
library(dygraphs)
p <- list()
for(study in params$chart.settings$chart_studies){
p[[study]] = dygraphs::dygraph(portfolio_data_xts(portfolios,data.name = study),main = study, group = "A") %>%
dyHighlight(highlightSeriesOpts = list(strokeWidth = 3)) %>%
dyOptions(colors = RColorBrewer::brewer.pal(6, "Set2"))
}
htmltools::tagList(p)
if(length(names((portfolio_data_xts(portfolios)))) >1){
chart.Correlation(portfolio_data_xts(portfolios))
}
chart.Boxplot(portfolio_data_xts(portfolios))
chart.RiskReturnScatter(portfolio_data_xts(portfolios))